<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // const声明一个只读的常量。一旦声明，常量的值就不能改变。
        const PI = 3.1415;
        PI // 3.1415

        PI = 3;
        // TypeError: Assignment to constant variable.
        //上面代码表明改变常量的值会报错。

    </script>
</body>

</html>